home *** CD-ROM | disk | FTP | other *** search
/ AppleScript - The Beta Release / AppleScript - The Beta Release.iso / Developer Scripts / FileMaker Pro 2.0 AS Examples / Match Data Demo / MatchRecords next >
Text File  |  1992-11-25  |  1KB  |  24 lines

  1. tell application "FileMaker Pro"
  2.     Show every Record of window "Original"
  3.     Show Layout "Full Page" of window "Original"
  4.     copy (Record count in window "Old File") to RecordsOldFile
  5.     copy (Record count in window "Original") to RecordsOriginal
  6.     repeat with i from 1 to RecordsOldFile
  7.         copy Cell "first Name" of Record i of window "old File" to firstName
  8.         copy Cell "surname" of Record i of window "old File" to surname
  9.         repeat with j from 1 to RecordsOriginal
  10.             copy Cell "first Name" of Record j of window "Original" to orgFirstName
  11.             copy Cell "surname" of Record j of window "Original" to orgSurname
  12.             copy Cell "Match" to matches
  13.             if firstName = orgFirstName and surname = orgSurname then
  14.                 Set Data Cell "match" of Record j of window "Original" to "Exists"
  15.                 copy RecordsOldFile to i
  16.             end if
  17.         end repeat
  18.         Show (every Record of window "original" whose Cell "match" = "Exists")
  19.         Do Menu Menu Item "Find Omitted" of Menu "Select"
  20.         copy (Record count in window "Original") to RecordsOriginal
  21.     end repeat
  22.     Show Layout "Listing" of window "Original"
  23.     Show (every Record of window "original" whose Cell "match" = "Exists")
  24. end tell